<% if @application_token.errors.any? %>
  $('#float-alert p').html("<%= escape_javascript(@application_token.errors.full_messages.join('<br/>')) %>");
<% else %>
  $("#application_token_<%= @application_token.id %>").remove();
  $('#float-alert p').html("Token <em>\"<%= @application_token.application %>\"</em> was removed successfully");
  <% if current_user.application_tokens.count < User::APPLICATION_TOKENS_MAX %>
    $('#add_application_token_btn').removeAttr("disabled");
  <% end %>
<% end %>
$('#float-alert').fadeIn(setTimeOutAlertDelay());
